<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        const fun = (a,b) => {
            console.log("a="+a);
            console.log("b="+b);
        }


        // 当箭头函数中只有一个参数的时候,可以省略()
        const fun1 = a => {
            console.log("a="+a);
        }
        // 定义参数时,可以为参数指定默认值
        const fun2 = (a=3,b=2,c=1) => {
            console.log("a="+a);
            console.log("b="+b);
        }
        fun(2,3);
    </script>
</head>
<body>
    
</body>
</html>